package com.ddtech.business.web.res;

import com.ddtech.models.BaseTreeBean;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * @version v1.0
 * @ClassName:AnswerTreeVo description：
 * @author:wei_zhang(xiao)
 * @date: 2023-06-01 14:42
 */
@Data
public class AnswerTreeVo extends BaseTreeBean {

    @ApiModelProperty(value = "id")
    private String id;

    @ApiModelProperty(value = "分类名称")
    private String label;

    @ApiModelProperty(value = "是否展示")
    private Integer isShow;

    @ApiModelProperty(value = "分类父id")
    private String pid;

    @ApiModelProperty(value = "章节名称")
    private String chapterName;

    @ApiModelProperty(value = "提问，回答问题人")
    private String userName;

    @ApiModelProperty(value = "问答内容")
    private String answerContent;

    @ApiModelProperty(value = "更新时间")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;

    @ApiModelProperty(value = "头像地址")
    private String avatar;

    @ApiModelProperty(value = "排序号")
    private Integer sort;

    @Override
    public String getIdValue() {
        return this.getId();
    }

    @Override
    public String getPidValue() {
        return this.getPid();
    }
}
